package com.spring.demo.springdemo.annotation.application;

import com.spring.demo.springdemo.annotation.conditional.MainConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author RenPu
 * @Date 2022/4/8 9:59
 * @Version 1.0
 * @Description:
 **/
public class MainClass {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext apc=new AnnotationConfigApplicationContext(MainConfig.class);
        String[] beanDefinitionNames = apc.getBeanDefinitionNames();
        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println(beanDefinitionName);

        }

    }
}
